<extend name="Base/common"/>
<block name="body">
    <div class="insurance">
        <div class="width1000">
            <img src="__PUBLIC__/Home/images/insurance1.png" alt="广告" class="ins_ad_img" />
            <div class="ins_tab">
                <a href="javascript:void(0);" class="f_l ins_tab_li">定制我的车险</a>
                <a href="{:U('Premium/index')}" class="f_l">试算我的保费</a>
            </div>
            <form action="{:U('step2')}" method="post" class="form_all" id="forms">
                <div class="clear form_list">
                    <div class="span3 f_l t_r">
                        <span class="form_list_left">车辆类型</span>
                    </div>
                    <div class="span7 f_l">
                        <label for="car_type1" class="select_type">
                            私家车
                        </label>
                        <input type="radio" class="hide" name="car_type" id="car_type1" />
                        <label for="car_type2" class="select_type">
                            企业车
                        </label>
                        <input type="radio" class="hide" name="car_type" id="car_type2" />
                        <span class="help_msg"></span>
                    </div>
                </div>
                <div class="clear form_list">
                    <div class="span3 f_l t_r">
                        <span class="form_list_left">所在省份</span>
                    </div>
                    <div class="span7 f_l">
                        <select name="" id="">
                            <option value="">浙江省</option>
                        </select>
                        <select name="c_dpt_cde" id="c_dpt_cde">
                            <option value="330100">杭州市</option>
                            <option value="330300">温州市</option>
                            <option value="330400">嘉兴市</option>
                            <option value="330500">湖州市</option>
                            <option value="330600">绍兴市</option>
                            <option value="330700">金华市</option>
                            <option value="330800">衢州市</option>
                            <option value="330900">舟山市</option>
                            <option value="331000">台州市</option>
                            <option value="331100">丽水市</option>
                        </select>
                        <span>(仅限浙江地区)</span>
                        <span class="help_msg"></span>
                    </div>
                </div>
                <div class="clear form_list">
                    <div class="span3 f_l t_r">
                        <span class="form_list_left">中华保险</span>
                    </div>
                    <div class="span7 f_l">
                        <label for="car_ins1" class="select_type">
                            续保
                        </label>
                        <input type="radio" class="hide" name="car_ins" id="car_ins1" />
                        <label for="car_ins2" class="select_type">
                            新投保
                        </label>
                        <input type="radio" class="hide" name="car_ins" id="car_ins2" />
                        <span class="help_msg"></span>
                    </div>
                </div>
                <div class="clear form_list">
                    <div class="span3 f_l t_r">
                        <span class="form_list_left">车牌号</span>
                    </div>
                    <div class="span7 f_l">
                        <select name="c_prefix" id="" class="car_licence">
                            <option>浙</option>
                        </select>
                        <input type="text" name="c_lcn_no" class="car_licence_input"/>
                        <span class="help_msg"></span>
                    </div>
                </div>
                <div class="clear form_list">
                    <div class="span3 f_l t_r">
                        <span class="form_list_left">车辆品牌</span>
                    </div>
                    <div class="span7 f_l">
                      <select id="c_brnd_cde" name="c_brnd_cde" class="required">
                        <volist name="brands" id="item">
                            <option value="{$item.brand_name}">{$item.brand_alpha}-{$item.brand_name}</option>
                        </volist>
                      </select>
                        <span class="help_msg"></span>
                    </div>
                </div>
                <div class="clear form_list">
                    <div class="span3 f_l t_r">
                        <span class="form_list_left">车架号</span>
                    </div>
                    <div class="span7 f_l">
                        <input type="text" name="c_vhl_frm" />
                        <span class="help_msg"></span>
                    </div>
                </div>
                <div class="clear form_list">
                    <div class="span3 f_l t_r">
                        <span class="form_list_left">发动机号</span>
                    </div>
                    <div class="span7 f_l">
                        <input type="text" name="c_eng_no" />
                        <span class="help_msg"></span>
                    </div>
                </div>
                <div class="clear form_list">
                    <div class="span3 f_l t_r">
                        <span class="form_list_left">车主姓名</span>
                    </div>
                    <div class="span7 f_l">
                        <input type="text" name="c_drv_owner" />
                        <input type="radio" name="car_owner" value="1" />先生
                        <input type="radio" name="car_owner" value="0" />女士
                        <span class="help_msg"></span>
                    </div>
                </div>
                <div class="clear form_list">
                    <div class="span3 f_l t_r">
                        <span class="form_list_left">手机号</span>
                    </div>
                    <div class="span7 f_l">
                        <input type="text" name="mobile" />
                        <span class="help_msg"></span>
                    </div>
                </div>
                <div class="clear form_list">
                    <div class="span3 f_l t_r">
                        <span class="form_list_left">验证码</span>
                    </div>
                    <div class="span7 f_l">
                        <input type="text" />
                        <a href="javascript:void(0);" class="code btn_hover">获取验证码</a>
                        <span class="help_msg"></span>
                    </div>
                </div>
                <div class="clear form_list">
                    <div class="span3 f_l t_r">
                        <span class="form_list_left">车辆初登日期</span>
                    </div>
                    <div class="span7 f_l">
                        <input type="text" name="c_fst_reg_dte" class="text datePicker" />
                        <span class="help_msg"></span>
                    </div>
                </div>
                <input type="submit" value="下一步" class="form_submit" />
            </form>
        </div>
    </div>
    </block>
<block name="script">
<script type="text/javascript" src="__PUBLIC__/Home/js/insurance.js"></script>
<script type="text/javascript" src="__PUBLIC__/Home/js/jquery.validate.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Home/js/carCommen.js"></script>
<script type="text/javascript" src="__PUBLIC__/Home/js/datePicker.js"></script>
<script type="text/javascript">
    /*时间控件*/
    $(function(){
        $(".datePicker").each(function(){
            $(this).datepicker({
                format: "yyyy-mm-dd",
                todayBtn: "linked",
                language: "zh-CN",
                autoclose: true,
                todayHighlight: true,
                endDate: "today"
            });
        }); 
    });
</script>
<script type="text/javascript">
    $(document).ready(function(){
        $('#forms').validate({
            rules: {
                car_type: "required",
                shortName_: "required"
            },
            messages: {
                car_type: "请选择车辆类型" ,
                shortName_: "请填写商品名称简写",
            },  
            showErrors: function(errorMap, errorList) { 
                $.each( errorList, function(i,v){
                    if(v.message!=""){ 
                        $(this.element).parent().parent().addClass('has_error');
                        $(this.element).nextAll(".help_msg").html(v.message);
                    }
                });  
            },
            /* 失去焦点时不验证 */
            onfocusout: false
        });
        $('#form1').find('input,select,textarea').on('change',function(){ 
            $(this).parent().parent().removeClass('has_error');
            $(this).nextAll(".help_msg").html("");
        });
    })
</script>
</block>
